// 清除浮动
@mixin clearfix {
  &::after {
    content: "";
    display: table;
    clear: both;
  }
}

// 圆角
@mixin border-radius($radius: $border-radius) {
  border-radius: $radius;
  -webkit-border-radius: $radius;
  -moz-border-radius: $radius;
}

// 阴影
@mixin box-shadow($shadow: $shadow) {
  box-shadow: $shadow;
  -webkit-box-shadow: $shadow;
  -moz-box-shadow: $shadow;
}

// 过渡
@mixin transition($property: all, $duration: 0.3s, $timing-function: ease) {
  transition: $property $duration $timing-function;
  -webkit-transition: $property $duration $timing-function;
  -moz-transition: $property $duration $timing-function;
}

// 弹性布局
@mixin flex($justify-content: center, $align-items: center, $flex-direction: row) {
  display: flex;
  justify-content: $justify-content;
  align-items: $align-items;
  flex-direction: $flex-direction;
}

// 定位居中
@mixin position-center($position: absolute) {
  position: $position;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
}
